@import './conf.scss';
@import './mixins/clearfix.scss';
@import './mixins/scroller.scss';

.bk-searcher-wrapper {
    position: relative;
    width: 100%;
    border: 1px solid #ccc;
    background-color: #fff;
    border-radius: 2px;
    .placeholder {
        position: absolute;
        left: 10px;
        top: 5px;
        font-size: 12px;
        color: #c3cdd7;
        z-index: 100;
        line-height: 30px;
    }
    .bk-searcher-dropdown-menu {
        position: absolute;
        z-index: 1;
        .bk-searcher-dropdown-content {
            @include scroller;
            min-width: 100%;
            height: auto;
            background-color: #fff;
            padding: 0;
            margin: 0;
            position: absolute;
            z-index: 50;
            border-radius: 2px;
            border: 1px solid #c3cdd7;
            box-sizing: border-box;
            opacity: 0;
            box-shadow: 0 2px 6px rgba(51, 60, 72, 0.1);

            &.is-show {
                z-index: 2;
                opacity: 1;
                display: inline-block;
                height: auto;
                overflow-y: auto;
                overflow-x: hidden;
            }
        }

        .bk-searcher-dropdown-list {
            width: 100%;
            max-height: 320px;
            list-style: none;
            padding: 0;
            margin: 0;
            > li {
                min-width: 120px;
                a {
                    display: block;
                    line-height: 41px;
                    padding: 0 15px;
                    color: #737987;
                    font-size: 14px;
                    text-decoration: none;
                    white-space: nowrap;
                    &.active,
                    &:hover {
                        background: #ebf4ff;
                        color: #3c96ff;
                    }
                }
                .paasng-icon {
                    margin-right: 5px;
                }
            }
        }
    }
    .bk-searcher {
        height: 30px;
        border-radius: 2px;
        font-size: 14px;
        position: relative;
        z-index: 1;
        background: #fff;
        cursor: pointer;
        white-space: nowrap;
        margin: 0 4px;
        overflow: hidden;
        overflow-x: scroll;
        &::-webkit-scrollbar {
            display: none;
        }
        &::-webkit-scrollbar-thumb {
            display: none;
        }
        &.disable {
            cursor: not-allowed;
        }

        .selectable {
            display: flex;
            cursor: pointer;
            border: 1px solid #dde4eb;
            font-size: 12px;
            border-radius: 2px;
            margin-right: 3px;
            .name {
                background-color: #fff;
                padding: 4px 10px;
            }
            .value-container {
                background-color: #fafbfd;
                border-left: 1px solid #dde4eb;
                padding: 4px 8px 4px 0;
                .value {
                    display: inline-block;
                    padding: 0px 5px 0 10px;
                }
                .remove-search-params {
                    display: inline-block;
                    padding: 0;
                }
                i {
                    font-size: 10px;
                    position: relative;
                    top: 1px;
                    display: inline-block;
                    transform: scale(0.8);
                }
            }
        }

        .input {
            padding: 0;
            border: 0;
            box-shadow: border-box;
            outline: none;
            height: 34px;
            margin: 0;
        }
        .search-params-wrapper {
            @include clearfix;
            @include scroller;
            height: 100%;
            line-height: 1;
            > li {
                display: inline-block;
                cursor: pointer;
                position: relative;
                top: -3px;
                margin: 0;
            }
            .key-node {
                background: #ebf4ff;
                padding-right: 16px;
                .remove-key {
                    display: inline-block;
                }
            }
            .remove-key {
                position: absolute;
                width: 16px;
                height: 16px;
                line-height: 16px;
                bottom: 5px;
                right: 3px;
                display: inline-block;
                font-size: 12px;
                text-align: center;
                color: $fontColor;
                display: none;
            }
        }
        .tag {
            display: inline-block;
            background-color: #ebf4ff;
            color: $fontColor;
            font-size: 12px;
            border: none;
            vertical-align: middle;
            box-sizing: border-box;
            overflow: hidden;
            border-radius: 2px;
            padding: 0 8px;
            min-height: 21px;
            line-height: 22px;
            word-break: break-all;
        }
    }
    .actions {
        position: absolute;
        right: 10px;
        top: 2px;
        color: #c4ced8;
        z-index: 10;
        height: 36px;
        line-height: 36px;
        .btn {
            font-size: 16px;
            color: #c4ced8;
            margin-left: 3px;
        }
        .disable-btn {
            cursor: not-allowed;
        }
    }
    .ip-searcher-footer {
        @include clearfix;
        height: 36px;
        line-height: 1;
        position: relative;
        font-size: 12px;
        .placeholder {
            position: absolute;
            top: 10px;
            left: 10px;
            color: #c3cdd7;
        }
    }
}
